package com.itheima.dome;

import java.util.ArrayList;
import java.util.Iterator;

public class dome1 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList();
        list.add("100");
        list.add("200");
        list.add("300");
        list.add("100");
        list.add("400");

        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).toString());
        }
        System.out.println("---------");
        for (String s : list) {
            System.out.println(s.toString());
        }
        System.out.println("--------------------");
        Iterator <String> iterator= list.iterator();
        while (iterator.hasNext()) {
            String s = iterator.next();
            System.out.println(s.toString());
        }
        System.out.println("---------------");

    }
}
